home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel Volume 2 #1
/
carousel.iso
/
mactosh
/
util
/
simulare.sit
/
Simula 4.07 Reference
/
card_54937.txt
< prev
next >
Wrap
Text File
|
1989-05-02
|
1KB
|
64 lines
-- card: 54937 from stack: in.07 Reference
-- bmap block id: 0
-- flags: 0000
-- background id: 13647
-- name:
-- part 1 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=17 top=288 right=310 bottom=101
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Expressions
----- HyperTalk script -----
on mouseUp
go to card id 53786
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=106 top=288 right=310 bottom=190
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: More
----- HyperTalk script -----
on mouseUp
go to card id 20293
end mouseUp
-- part contents for background part 2
----- text -----
Boolean expression
-- part contents for background part 1
----- text -----
Operators: not, and, or, imp (implies), eqv (equivalence between Boolean values), and then, or else.
"and then" and "or else" are short-cut "and" and "or":
A and then B: if A then B else false
A or else B: if A then true else B
The priorities between operators are such that parentheses do not have to be inserted as often as in e.g. Pascal:
X >0 and X < 10 is correct [as is (X>0) and (X<10), if you like that better].